﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mindfor.Web.Data;

namespace Mindfor.Web.Routing
{
	/// <summary>
	/// Contains infomration about all UrlRouteAttributes for action.
	/// </summary>
	public class ActionRouteInfo
	{
		/// <summary>
		/// Gets or sets  action path.
		/// </summary>
		public ActionPath ActionPath { get; set; }

		/// <summary>
		/// Gets url route infos that applied to action.
		/// </summary>
		public List<UrlRouteInfo> Routes { get; private set; }

		/// <summary>
		/// Gets or sets main action name for sub action.
		/// </summary>
		public string MainAction { get; set; }

		/// <summary>
		/// Initializes new instance.
		/// </summary>
		/// <param name="moduleName">Module name where to search for action.</param>
		/// <param name="controllerName">Controller name where to search for action.</param>
		/// <param name="actionName">Action mame.</param>
		public ActionRouteInfo(string moduleName, string controllerName, string actionName)
		{
			ActionPath = new ActionPath(moduleName, controllerName, actionName);
			Routes = new List<UrlRouteInfo>();
		}
	}
}
